import request from '@/utils/request';

export function addSn(token, sn) {
    return request({
        url: '/sn/add',
        method: 'post',
        data: sn,
        params: {
            token: token
        }
    });
}

export function renewSn(sn) {
    return request({
        url: '/sn/renew',
        method: 'post',
        data: sn,
    });
}

export function removeSn(snId) {
    return request({
        url: '/sn/remove',
        method: 'post',
        params: {
            snId: snId
        }
    });
}

export function fetchAllSn(token) {
    return request({
        url: '/sn/list',
        method: 'get',
        params: {
            token: token
        }
    });
}
